Evaluate the triple integral. $ \int_0^3 \int_{-2}^1 \int_1^2 x^2 - 2y + xz \, dy \, dz \, dx =$
We can evaluate triple integrals by repeated integration: $ \int_{a_0}^{a_1} \int_{b_0}^{b_1} \int_{c_0}^{c_1} f(x, y, z) \, dx \, dy \, dz = \int_{a_0}^{a_1} \left( \int_{b_0}^{b_1} \left[ \int_{c_0}^{c_1} f(x, y, z) \, dx \right] dy \right) dz$ The first layer: $\begin{aligned} &\int_0^3 \int_{-2}^1 \int_1^2 x^2 - 2y + xz \, dy \, dz \, dx \\ \\ &= \int_0^3 \int_{-2}^1 \left[ x^2y - y^2 + xzy\right]_1^2 dz \, dx \\ \\ &= \int_0^3 \int_{-2}^1 x^2 + xz - 3 \, dz \, dx \end{aligned}$ The second layer: $\begin{aligned} &\int_0^3 \int_{-2}^1 x^2 + xz - 3 \, dz \, dx \\ \\ &= \int_0^3 \left[ x^2z + \dfrac{xz^2}{2} - 3z \right]_{-2}^1 dx \\ \\ &= \int_0^3 3x^2 - \dfrac{3x}{2} - 9 \, dx \end{aligned}$ The third layer: $\begin{aligned} &\int_0^3 3x^2 - \dfrac{3x}{2} - 9 \, dx \\ \\ &= \left[ x^3 + \dfrac{3x^2}{4} - 9x \right]_0^3 \\ \\ &= 27 - \dfrac{27}{4} - 27 \\ \\ &= -\dfrac{27}{4} \end{aligned}$ In conclusion: $ \int_0^3 \int_{-2}^1 \int_1^2 x^2 - 2y + xz \, dy \, dz \, dx = \dfrac{-27}{4}$